    	<div class="leftMenuBox leftMenuBoxwidth">
        	<ul class="leftMenu leftMenuBoxwidth"> 
            <?php
	function get_sub_category ($category_list,$parent_id) {
		$array = array();
		foreach($category_list as $k=>$v) {
			if($v['parent_id']==$parent_id) {
				$array[$k] = $v;
			}
		}
		return $array;
	}			
                $category_0 = get_sub_category($category_list_new,0);
				$num =0;
                foreach($category_0 as $v) { $num++; ?>			
                <li class="<?php if($num==1) { ?>first <?php } ?>leftMenuLi">
                    <div class="item arrow1">
                        <a href="<?php echo $this->_url('shop/products/'.$SHOP['id'].'/?cat='.$value['id']);?>" class="leftMenuItem a_width">
                            <div class="leftMenuLeft"><?php echo  $v['shop_cat_name'];?></div>
                        </a>
                        <b class="pointer"></b>
                    </div>
                    <?php  
					$category_sub = get_sub_category($category_list_new,$v['id']);
					$count = 0;
					if(!empty($category_sub)){ 
					    foreach($category_sub as $value) {
						    $count++;
					    }
					} 
                    $num1 = intval($count/2);                    					
					?>				
                    <div class="leftMenuCat left1">
                    	<div class="catLeft">
                           <?php if(!empty($category_sub)){?> 						
                        	<div class="catItem">
                            	<h3><a href="<?php echo $this->_url('shop/products/'.$SHOP['id'].'/?cat='.$value['id']);?>"><?php echo  $v['shop_cat_name'];?></a></h3>
                                <?php $num2 = 0;foreach($category_sub as $value) { $num2++;
								if($num2>$num1) {break;}
								?>                             
							    <a href="<?php echo $this->_url('shop/products/'.$SHOP['id'].'/?cat='.$value['id']);?>"><?php echo  $value['shop_cat_name'];?></a>
								<?php  }?>
                            </div>
							<?php  }?>
                        </div>
                        <div class="catRight">
                        	<div class="catItem">
                            	<h3><a href="<?php echo $this->_url('shop/products/'.$SHOP['id'].'/?cat='.$value['id']);?>">更多商品>></a></h3>
                                <?php $num2 = 0;foreach($category_sub as $value) { $num2++;
								if($num2<=$num1) {continue;}
								?>                             
							    <a href="<?php echo $this->_url('shop/products/'.$SHOP['id'].'/?cat='.$value['id']);?>"><?php echo  $value['shop_cat_name'];?></a>
								<?php  }?>
                            </div>
                        </div>
                    </div>
                </li>
            <?php }?>	
                <li class="last"><a href="<?php echo $this->_url('shop/products/'.$SHOP['id']);?>" class="more">更多商品>></a></li>
            </ul>
            <div class="clear"></div>
        </div>